added SSCLI 1.0
[windows-sources.git] / shared source / sscli20 / samples / compilers / myc / src / var.cs
blob5bf91def3974920c6bbc85036c08c8e837351c0a
1 //------------------------------------------------------------------------------
2 // <copyright file="var.cs" company="Microsoft">
3 //
4 // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
5 //
6 // The use and distribution terms for this software are contained in the file
7 // named license.txt, which can be found in the root of this distribution.
8 // By using this software in any fashion, you are agreeing to be bound by the
9 // terms of this license.
10 //
11 // You must not remove this notice, or any other, from this software.
12 //
13 // </copyright>
14 //------------------------------------------------------------------------------
16 namespace MyC
18 using System;
19 using System.Text;
20 using System.Collections;
21 using System.Reflection;
23 public class Var
25 private int type;
26 private String name;
27 private VarList methodparams; /* possible param varlist */
28 private int vclass;
29 private int sign;
30 private int index;
31 private Object fieldbuilder;
32 private Object methodbuilder;
33 private Object localtoken;
35 public int getTypeId() { return type; }
36 public void setTypeId(int t) { type = t; }
37 public String getName() { return name; }
38 public void setName(String s) { name = s; }
39 public VarList getParams() { return methodparams; }
40 public void setParams(VarList p) { methodparams = p; }
41 public int getClassId() { return vclass; }
42 public void setClassId(int v) { vclass = v; }
43 public int getSign() { return sign; }
44 public void setSign(int i) { sign = i; }
45 public int getIndex() { return index; }
46 public void setIndex(int i) { index = i; }
48 public Object getFieldBuilder() { return fieldbuilder; }
49 public void setFieldBuilder(Object f) { fieldbuilder = f; }
50 public Object getMethodBuilder() { return methodbuilder; }
51 public void setMethodBuilder(Object f) { methodbuilder = f; }
52 public Object getLocalToken() { return localtoken; }
53 public void setLocalToken(Object f) { localtoken = f; }
55 public override string ToString()
57 StringBuilder sb = new StringBuilder(name);
58 sb.Append("(Id=");
59 sb.Append(vclass);
60 sb.Append(",Sign=");
61 sb.Append(sign);
62 sb.Append(")");
63 return sb.ToString();